import com.lcj.springems.dao.EmpDao;
import com.lcj.springems.service.EmpService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("classpath*:emsapplicationcontext.xml");
        EmpDao empDao = (EmpDao) ac.getBean("empDao");
        EmpService empService = (EmpService) ac.getBean("empService");
        System.out.println(empDao);
        System.out.println(empService);
    }
}
